#ifndef TEXTUREMANAGER_H_INCLUDED
#define TEXTUREMANAGER_H_INCLUDED 


#include <string> 
#include <map> 
#include <SDL.h> 


class TextureManager 
{
public: 
    static TextureManager* Instance() 
	{
	    if (s_pInstance == nullptr) 
		{
		    s_pInstance = new TextureManager(); 
			return s_pInstance; 
	    } 
		
		return s_pInstance; 
	}
	
	bool loadTexture(std::string, std::string, SDL_Renderer*); 
	// For drawing an individual image
	void Draw(std::string, int, int, int, int, SDL_Renderer*, SDL_RendererFlip = SDL_FLIP_NONE); 
	// For drawing from a sprite sheet by specifying the image frame and it's position by row
	void drawFrame(std::string, int, int, int, int, int, int, SDL_Renderer*, SDL_RendererFlip = SDL_FLIP_NONE); 
	
private: 
	TextureManager() {}; 
	~TextureManager() {}
	TextureManager(const TextureManager&); 
	TextureManager& operator=(const TextureManager&); 
	
	std::map <std::string, SDL_Texture*> m_textureMap; 
	
	static TextureManager* s_pInstance;  
}; 


#endif // TEXTUREMANAGER_H_INCLUDED